package com.llt.order.controller;


import com.llt.order.model.OrderDetail;
import com.llt.order.service.IOrderDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 订单表 前端控制器
 * </p>
 *
 * @author llt
 * @since 2024-05-10
 */
@RestController
@RequestMapping("/order")
public class OrderDetailController {

    @Autowired
    private IOrderDetailService orderService;

    // 根据 id 返回订单信息
    @RequestMapping("/{orderId}")
    public OrderDetail getOrderById(@PathVariable("orderId") Integer orderId) {
        return orderService.getOrderById(orderId);
    }

}
